package com.wenlong.train_ticketing_system_springboot.querymodule.pojo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.Version;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.wenlong.train_ticketing_system_springboot.querymodule.utils.LongJsonDeserializer;
import com.wenlong.train_ticketing_system_springboot.querymodule.utils.LongJsonSerializer;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 
 * @TableName t_ticket
 */
@TableName(value ="t_ticket")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Ticket implements Serializable {
    @TableId
    @JsonSerialize(using = LongJsonSerializer.class)
    @JsonDeserialize(using = LongJsonDeserializer.class)
    private Long id;
    private Double price;
    private Integer store;
//    @DateTimeFormat(pattern = "HH:mm:ss")
//    @JsonFormat(pattern = "HH:mm:ss")
    private Date departTime;
    private String descrip;
    @Version
    private Integer version;
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}